import { get, post, del } from "../util/request";
// 添加购物车
export const addtocart = (data) => {
  return post("/api/v1/shop_carts", data);
};

// 获取购物车列表
export const reqCartlist = () => get("/api/v1/shop_carts");

// 根据id删除单个购物车信息
export const reqDeleteCart = (id) => del("/api/v1/shop_carts/" + id);

// 批量删除购物车
export const reqDeleteCarts = (id) =>
  post("/api/v1/shop_carts/delmany", { id }); // ids:ids

//添加订单信息
export const addshuju = (data) => {
  return post("/api/v1/orders", data);
};
// 获取订单信息
export const reqshuju = () => {
  return get("/api/v1/orders");
};
